<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="备份">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001826879840.html">
  <meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001839281753.html">
  <meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001792402592.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
  <meta name="DC.Publisher" content="20240320">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="ZH-CN_TOPIC_0000001839281661">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>备份</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="ZH-CN_TOPIC_0000001839281661"></a><a name="ZH-CN_TOPIC_0000001839281661"></a>
  <h1 class="topictitle1">备份</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle">前提条件</h4>
    <ul>
     <li>在执行数据库备份前必须开启归档模式。<p>修改postgresql.conf文件中的wal_level 、archive_mode和archive_command参数。</p>
      <ul>
       <li>将wal_level设置为archive（PostgreSQL 9.6以上版本为replica）及以上。</li>
       <li>将archive_mode设置为on。</li>
       <li>将archive_command设置为 'cp %p /home/postgres/archivedir/%f'，并确保归档日志的路径是单个路径。</li>
      </ul> <p>例如：</p> <p>wal_level = replica</p> <p>archive_mode = on</p> <p>archive_command = 'cp %p /home/postgres/archivedir/%f'</p></li>
    </ul>
   </div>
  </div>
  <div>
   <ul class="ullinks">
    <li class="ulchildlink"><strong><a href="zh-cn_topic_0000001839281753.html">备份前准备</a></strong><br></li>
    <li class="ulchildlink"><strong><a href="zh-cn_topic_0000001792402592.html">备份PostgreSQL</a></strong><br></li>
   </ul>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="zh-cn_topic_0000001826879840.html">PostgreSQL数据保护</a>
    </div>
   </div>
  </div>
 </body>
</html>